Skip to content

Commit

Permalink
Merge pull request #78 from juank-pa/jpazmino/fix_get_ticket_form_id_…
Browse files Browse the repository at this point in the history
…overflow

Fix get ticket form is overflow issue
  • Loading branch information
Steven Diviney committed Jun 18, 2018
2 parents 5548dab + 3816d20 commit 17b0abf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -88,7 +88,7 @@ public void addCommentWithAttachments(final String gameObjectName, String callba
new ZendeskUnityCallback<Comment>(gameObjectName, callbackId, "didRequestProviderAddCommentWithAttachments"));
}

public void getTicketFormWithIds(final String gameObjectName, String callbackId, int[] ticketFormsIds, int formsCount){
public void getTicketFormWithIds(final String gameObjectName, String callbackId, long[] ticketFormsIds, int formsCount){

Long[] result = new Long[formsCount];
for (int i = 0; i < formsCount; i++) {
Expand Down
4 changes: 2 additions & 2 deletions ios-plugin/src/ZendeskProviderRequest.m
Expand Up @@ -65,13 +65,13 @@ void _zendeskRequestProviderAddComment(char * gameObjectName, char * callbackId,
withCallback:callback];
}

void _zendeskRequestProviderGetTicketFormWithIds(char * gameObjectName, char * callbackId, int ticketFormsIds[], int formsCount) {
void _zendeskRequestProviderGetTicketFormWithIds(char * gameObjectName, char * callbackId, int64_t ticketFormsIds[], int formsCount) {
ZDKRequestProvider *provider = [ZDKRequestProvider new];
ZDKDefCallback(NSArray<ZDKTicketForm*>*, [result toJSONString], "didRequestProviderGetTicketFormWithIds")

NSMutableArray *formIds = @[].mutableCopy;
for (int i = 0 ; i < formsCount ; i ++) {
[formIds addObject:[NSNumber numberWithInt:ticketFormsIds[i]]];
[formIds addObject:[NSNumber numberWithLongLong:ticketFormsIds[i]]];
}

[provider getTicketFormWithIds:formIds callback:callback];
Expand Down
6 changes: 3 additions & 3 deletions unity-src/scripts/ZDKRequestProvider.cs
Expand Up @@ -145,9 +145,9 @@ public class ZDKRequestProvider : ZDKBaseComponent {
/// </summary>
/// <param name="ticketForms">List of ticket form ids to get.</param>
/// <param name="callback">Callback that will deliver a List of Ticket Forms.</param>
public static void GetTicketForms(int[] ticketForms, Action<ArrayList,ZDKError> callback) {
public static void GetTicketForms(long[] ticketForms, Action<ArrayList,ZDKError> callback) {
if (ticketForms == null)
ticketForms = new int[0];
ticketForms = new long[0];
instance().Call("getTicketFormWithIds", callback, ticketForms, ticketForms.Length);
}

Expand Down Expand Up @@ -184,7 +184,7 @@ public class ZDKRequestProvider : ZDKBaseComponent {
[DllImport("__Internal")]
private static extern void _zendeskRequestProviderAddCommentWithAttachments(string gameObjectName, string callbackId, string comment, string requestId, string[] attachments, int attachmentsLength);
[DllImport("__Internal")]
private static extern void _zendeskRequestProviderGetTicketFormWithIds(string gameObjectName, string callbackId, int[] ticketFormsIds, int formsCount);
private static extern void _zendeskRequestProviderGetTicketFormWithIds(string gameObjectName, string callbackId, long[] ticketFormsIds, int formsCount);
[DllImport("__Internal")]
private static extern void _zendeskRequestProviderGetUpdatesForDevice(string gameObjectName, string callbackId);
[DllImport("__Internal")]
Expand Down

0 comments on commit 17b0abf

Please sign in to comment.